package com.motherchild.user.controller;

import com.motherchild.common.ApiResponse;
import com.motherchild.user.dto.BabyRecommendationResponse;
import com.motherchild.user.dto.MbDTO;
import com.motherchild.user.dto.User;
import com.motherchild.user.dto.UserLoginDTO;
import com.motherchild.user.service.RecommendationService;
import com.motherchild.user.service.UserLoginService;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhuchenxu
 * @create 2025-02-12-10:15
 */
@RestController
@RequestMapping("/mbRecommend")
@Slf4j
public class MbRecommendController {

    @Autowired
    private RecommendationService recommendationService;

    @PostMapping("/baby")
    public ApiResponse<BabyRecommendationResponse> getBabyRecommendations(@RequestBody(required = false) MbDTO mbDTO) {

        return ApiResponse.success(recommendationService.getBabyRecommendations(mbDTO.getType(), mbDTO.getAgeRange()));
    }

}
